package com.wanhelibs;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;

import com.loginlib.login.dialog.SetDialog;
import com.wanhe.base.util.SPUtils;
import com.wanhe.qrcode.CaptureActivity;


public class MainActivity extends AppCompatActivity {

//    @Inject
//    ServerApi serverApi;
//    @Inject
//    Runner runner;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        if(TextUtils.isEmpty(SPUtils.getIp())){
            SetDialog setDialog = new SetDialog(this);
            setDialog.show();
        }
        findViewById(R.id.testBtn).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                CaptureActivity.startCaptureActivity(MainActivity.this);
            }
        });
//        findViewById(R.id.testBtn).setOnLongClickListener(new View.OnLongClickListener() {
//            @Override
//            public boolean onLongClick(View view) {
//                startActivity(new Intent(MainActivity.this, LoginActivity.class));
//                return false;
//            }
//        });

    }

}
